#pragma once
#include "BasicFunction.h"
using namespace std;

class CLinguisticProcessing
{
public:
	CLinguisticProcessing(string corpuspath);
	CLinguisticProcessing(string corpuspath, unsigned int numberofbins);

	//Member functions
	vector<double> GetLinguisticFeature(string document);		//Get the linguistic features
	void SetParameters(unsigned int numberofbins);					//Set parameters for linguistic feature extraction
	void SaveCorpusToFile(string filepath);								//Save the corpus to a text file
	void SortCorpus();															//Sort the corpus
	vector<string> GetKeywords(string document);					//Get the keywords in a document
	vector<unsigned int> CountFrequency(string document);	//Count the frequency of keywords in a document
	string FindFrequentKeywords(string document, unsigned int numberofwords);	//Find the most frequency keywords in a document
private:
	//Member variables
	vector<_corpusunit> corpus;
	CBasicFunction bf;
	bool		logspace;
	vector<unsigned int> wordsinbin;

	~CLinguisticProcessing(void);
};
